package cn.tedu.controller;

import cn.tedu.pojo.Phone;
import cn.tedu.service.PhoneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("phone")
public class PhoneController {
    @Autowired
    private PhoneService phoneService;
    @RequestMapping("get")
    public Phone get(){
        return phoneService.get();
    }
    @RequestMapping("add")
    public void add(Phone p){
        phoneService.add(p);
    }
}
